Sync fork to TransformerEngine v2.17 - #104
Closed
Caozhou1995 wants to merge 1 commit into
Closed
Conversation
Integrates upstream NVIDIA/TransformerEngine v2.17 (commit 2e559f0) into flagos-ai/TransformerEngine-FL:main, preserving all multi-backend plugin work. - Upstream v2.14 -> v2.17 integration (EP, MXFP8/NVFP4, fused router/MLP) - 25 conflict files resolved, fork patches preserved (torch_nv, te_device_type, OpManager dispatcher, 9-backend CI/CD) - P0: removed 2 deleted C++ bindings (convert_host_pointers_to_tensor, get_device_pointer_for_data_and_scales) from plugin + 6 vendors - Enum sync: DType assert ==->subset, NVTE_QKV_Format/Layout members - Device abstraction re-injected (quantized_tensor.py make_empty etc.) - Includes #94 KunlunXin CICD support
Caozhou1995
force-pushed
the
sync/upstream-v2.17-squashed
branch
from
August 11, 2026 11:52
020dd8b to
62505ee
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Sync fork to TransformerEngine v2.17
This PR integrates upstream NVIDIA/TransformerEngine v2.17, preserving all multi-backend plugin architecture and device abstraction patches.
Summary
2e559f06)sync/upstream-v2.17-squashed(single squashed commit:dcfe4d60)Key Changes
1. Upstream Integration (v2.14 → v2.17)
Merged 3 months of upstream development, including:
2. Conflict Resolution (25 files)
Preserved fork patches:
torch→torch_nvframework extension loading (pytorch/init.py)te_device_type()device abstraction throughout codebaseAccepted upstream refactors:
Device abstraction re-injection points:
3. Plugin API Audit & P0 Fixes
Problem: Upstream PR#3001 deleted 2 C++ bindings that 6 vendor backends depended on:
convert_host_pointers_to_tensor→ replaced bycopy_data_ptrs_to_deviceget_device_pointer_for_data_and_scales→ replaced bytransform_and_copy_data_ptrs_to_deviceSolution: Removed dead registrations from plugin layer (13 files: plugin/core/ops.py + 6 vendor backends × 2 files each)
Affected backends: cuda, enflame, hygon, iluvatar, metax, musa
4. Enum Synchronization (3 files)
Root cause: Fork's plugin architecture defines IntEnum mirrors of C++ enums for reference backend, but v2.17 added strict equality checks between C++/Python enums + new enum members.
Fixes:
==→<=(subset check)NVTE_BHSD=7,NVTE_QKV_Format_NOT_SET=8NVTE_BHSD_BHSD_BHSD=255. Build Integration
Submodules:
cudnn-frontend:7b9b711c→e46d7082(v2.17)cutlass:e64a9136(fork, unchanged)googletest:a0f06a70(fork, unchanged)nccl:a6b5de08(NEW in v2.17 for EP support)Build note: NCCL EP compilation requires
NVTE_WITH_NCCL_EP=0until submodule SHA updated to version with required APIs (ncclWinGetUserPtr, ncclGetPeerDevicePointer, etc.). This is an upstream deficiency, not introduced by this sync.Verification
CUDA Backend (H100 hardware)
import transformer_engine.pytorchsuccessful (no AttributeError)vendor.cudaOther Backends
Code Quality
Artifacts
Detailed resolution logs and analysis artifacts available at:
/workspace/upgrade/artifacts/te-upstream-v2.17/Key files:
fork-delta.txt- Initial delta analysis (233 files)decisions.tsv- Decision log for all conflictsstage2-resolution-summary.txt- Conflict resolution detailsbindings.txt/plugin-base.txt/registered.txt- API surface auditapi-matrix.tsv- Plugin API compatibility matrixTesting Recommendations
Notes
Verification command (CUDA):